// stores/app.ts
import { defineStore } from 'pinia'

export const useSizeStore = defineStore('app', {
	state: () => ({
		fontSize: Number(uni.getStorageSync('fontSize') || 16) // 默认 16px
	}),
	actions: {
		setFontSize(size : number) {
			this.fontSize = size
			uni.setStorageSync('fontSize', size)
		}
	}
})